import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path' // 需要安装 @types/node

export default defineConfig({
  plugins: [vue()],
  server: {
    proxy: {
      // 简单代理示例
      '/api': {
        target: 'https://actdota.5211game.com',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ''),
      },
    },
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'), // 确保这里指向 src 目录
    },
  },
})
